iT邦幫忙

DAY 27
1

從最底層基礎建設到軟體開發,無所不包的雲端系列 第 27

從最底層基礎建設到軟體開發,無所不包的雲端(Openstack Day 18)

  • 分享至 

  • xImage
  •  

今天主要的安裝目標是將Glance Service 安裝完成,並且註冊一個image

提供之後Nova Service 來做虛擬機器的開設

Step 1. Installing the Image Service

apt-get install -y glance python-glanceclient

Step 2. Edit the Glance configuration files and paste ini middleware files

nano /etc/glance/glance-api.conf (modify)

[DEFAULT]

rpc_backend = rabbit

rabbit_host = [Controller_IP]

rabbit_password = RABBIT_PASS

[database]

connection = mysql://glance:GLANCE_DBPASS@[Controller_IP]/glance

[keystone_authtoken]

auth_uri = http://[Controller_IP]:5000

auth_host = [Controller_IP]

auth_port = 35357

auth_protocol = http

admin_tenant_name = service

admin_user = glance

admin_password = GLANCE_PASS

[paste_deploy]

flavor = keystone

nano /etc/glance/glance-registry.conf (modify)

[database]

connection = mysql://glance:GLANCE_DBPASS@[Controller_IP]/glance

[keystone_authtoken]

auth_uri = http://[Controller_IP]:5000

auth_host = [Controller_IP]

auth_port = 35357

auth_protocol = http

admin_tenant_name = service

admin_user = glance

admin_password = GLANCE_PASS

[paste_deploy]

flavor = keystone

mysql -u root -p

CREATE DATABASE glance;

GRANT ALL ON glance.* TO 'glance'@'%' IDENTIFIED BY 'GLANCE_DBPASS';

GRANT ALL ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'GLANCE_DBPASS';

su -s /bin/sh -c "glance-manage db_sync" glance

keystone user-create --name=glance --pass=GLANCE_PASS --email=glance@example.com

keystone user-role-add --user=glance --tenant=service --role=admin

keystone service-create --name=glance --type=image --description="Glance Image Service"

keystone endpoint-create --service-id=$(keystone service-list | awk '/ image / {print $2}') --publicurl=http://[Controller_IP]:9292 --internalurl=http://[Controller_IP]:9292 --adminurl=http://[Controller_IP]:9292

service glance-registry restart

service glance-api restart

Step 3. Adding and Verifying the Image Service Installation

glance image-create --name="cirros-0.3.2-x86_64" --disk-format=qcow2 --container-format=bare --is-public=true --copy-from http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img

glance image-list

Day 27 ending


上一篇
從最底層基礎建設到軟體開發,無所不包的雲端(Openstack Day 17)
下一篇
從最底層基礎建設到軟體開發,無所不包的雲端(Openstack Day 19)
系列文
從最底層基礎建設到軟體開發,無所不包的雲端30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言